package com.hl.toolkit.framework.core.util.page;

import java.io.Serializable;
import java.util.HashMap;
import java.util.Map;


/**
 * 分页帮助类
 * 
 * @author  薛立旷
 * @version  [1.0, 2016年6月16日]
 * @since  [utlz/2.0]
 */
//@Alias("ph")
public class PageHelper implements Serializable {
	private static final long serialVersionUID = -271283412345262912L;
	/** 当前页 */
	private int page = 1;
	/** 每页显示条数 */
	private int rows = 10;
	/** 查询开始记录 */
	private int start;
	/** 查询条件 */
	private Map<String,Object> op = new HashMap<String,Object>();
	


	
	public int getPage() {
		return page;
	}

	public void setPage(int page) {
		this.page = page;
	}

	public int getRows() {
		return rows;
	}
	
	public void setRows(int rows) {
		this.rows = rows;
	}
	
	public int getStart() {
		start = (this.getPage()-1)*this.getRows();
		return start;
	}

	public void setStart(int start) {
		this.start = start;
	}

	public Map<String, Object> getOp() {
		if(op.get("is_read")!=null&&"".equals((op.get("is_read")+"").trim())){
			op.put("is_read",null);
		}
		return op;
	}

	public void setOp(Map<String, Object> op) {
		this.op = op;
	}



}
